<html>
  <body>
    <form action="/addgame" method="post">
      <label for="gameName">Name</label><input type="text" name="gameName" id="gameName"><br />
      <label for="gameWidth">Width</label><input type="text" name="gameWidth" id="gameWidth"><br />
      <label for="gameHeight">Height</label><input type="text" name="gameHeight" id="gameHeight"><br />
      <select name="gameCategory" id="gameCategory">
        {% for category in category_list %}
        <option value="{{ category.key }}">{{ category.name }}</option>
        {% endfor %}
      </select>
      <br />
      <input type="submit" value="addGame">
    </form>
    <form action="/addgame" method="post">
      <label for="category">Name</label><input type="text" name="category" id="category"><br />
      <input type="submit" value="addCategory">
    </form>
    <table border="1">
      <h3>Game List</h3>
      <tr>
        <th>Name</th>
        <th>Width</th>
        <th>Height</th>
        <th>Category</th>
        <th>Key</th>
        <th>ID</th>
      </tr>
      {% for game in game_list %}
      <tr>
        <td>{{ game.name }}</td>
        <td>{{ game.width }}</td>
        <td>{{ game.height }}</td>
        <td>{{ game.category.name }}</td>
        <td>{{ game.key }}</td>
        <td>{{ game.key.id }}</td>
      </tr>
      {% endfor %}
    </table>
    <br />
    <table border="1">
      <h3>Category List</h3>
      <tr>
        <th>Name</th>
        <th>Count</th>
        <th>Key</th>
        <th>ID</th>
      </tr>
      {% for category in category_list %}
      <tr>
        <td>{{ category.name }}</td>
        <td>{{ category.count }}</td>
        <td>{{ category.key }}</td>
        <td>{{ category.key.id }}</td>
      </tr>
      {% endfor %}
    </table>

  </body>
</html>